import request from '@/util/http';

/**
 *  添加轮播
 */
export const addBannerAPI = (data) =>
  request({
    url: '/classes/banner',
    method: 'POST',
    data,
  });

/**
 *  获取轮播数据列表
 */
export const getBannerAPI = () =>
  request({
    url: '/classes/banner',
  });

/**
 *  修改轮播图数据
 */
export const updateBanner = (id, data) =>
  request({
    method: 'PUT',
    url: `/classes/banner/${id}`,
    data,
  });
